<?php

    #-------------------------------------------------------------#
	# This file is part of the Tekuna MVC Microframework for PHP. #
	# (c) 2009 Niels Jäckel <niels.jaeckel@tekuna.org>            #
	# Please visit http://tekuna.org/ for more information.       #
	#                                                             #
	# This software is licensed under the MIT License. Please     #
	# view the LICENSE file for the full text of this license.    #
    #-------------------------------------------------------------#


	class ClassLoaderTest extends AbstractTekunaTestCase {

		public function testInternalClass() {

			Tekuna :: load('ArrayIterator');
		}

		public function testLoadClass() {

			// class does not exist
			$this->assertFalse(in_array('LoadingTestClass', get_declared_classes()));

			// load class
			Tekuna :: load('org.tekuna.test.base.LoadingTestClass');

			// clas exists now
			$this->assertTrue(in_array('LoadingTestClass', get_declared_classes()));
		}

		public function testLoadInterface() {

			// interface does not exist
			$this->assertFalse(in_array('LoadingTestInterface', get_declared_interfaces()));

			// load interface
			Tekuna :: load('org.tekuna.test.base.LoadingTestInterface');

			// interface exists now
			$this->assertTrue(in_array('LoadingTestInterface', get_declared_interfaces()));
		}
	}



